<?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
  <!ENTITY dc "http://purl.org/dc/elements/1.1/">
  <!ENTITY dcterms "http://purl.org/dc/terms/">
  <!ENTITY foaf "http://xmlns.com/foaf/0.1/">
  <!ENTITY a "http://xmlns.heustics.org/schema/myelin/0.1/">
  <!ENTITY m "http://xmlns.heustics.org/ontology/myelin/0.1/">
]>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:a="http://xmlns.heustics.org/schema/myelin/0.1/"
  xmlns:o="http://xmlns.heustics.org/schema/myelin/0.1/DomainProfile#view"
  xmlns:l="http://xmlns.heustics.org/schema/i18n/0.1/"
  exclude-result-prefixes="xsl a o l"
>  
  <xsl:variable name="o:l10n" select="a:get-l10n('&a;DomainProfile#view')"/>
  <xsl:variable name="o:actions-l10n" select="$o:l10n/l:context[@name='actions']/*"/>
  <xsl:variable name="o:new-actions-l10n" select="$o:l10n/l:context[@name='new-actions']/*"/>
  
  <xsl:template match="a:acl" mode="a:node-action">
    <xsl:param name="key" select="string(@key)"/>
    <xsl:param name="label" select="$o:actions-l10n[@key=$key]"/>
    <xsl:choose>
      <xsl:when test="$label">
        <xsl:call-template name="a:node-action">
          <xsl:with-param name="key" select="$key"/>
          <xsl:with-param name="label" select="$label"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-imports/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
  
  <xsl:template match="a:acl[@key='search-members']" mode="a:node-action"> 
    <xsl:param name="key" select="string(@key)"/>
    <xsl:call-template name="a:node-action-href-ext">
      <xsl:with-param name="action" select="$action"/>
      <xsl:with-param name="label" select="$o:actions-l10n[@key=$key]"/>
      <xsl:with-param name="href-ext" select="'search=show-all&amp;event=show-all'"/>
    </xsl:call-template>
  </xsl:template>
  
  <xsl:template match="a:entry[@key='nick']" mode="a:agent-dict"/>
    
</xsl:stylesheet>

